package org.yzl.designPatterns.templatemethod;

public abstract class AbstractTemplate {

    public int count(String exp , String opt){
        int[] ints = split(exp, opt);
        int result = count(ints[0],ints[1]);
        return result;
    }

    public abstract int count(int one ,int two);

    private int[] split(String exp,String opt){
       String[] strs = exp.split(opt);
       int[] ints = new int[2];
       ints[0] = Integer.parseInt(strs[0]);
       ints[1] = Integer.parseInt(strs[1]);
       return ints;
    }
}
